<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>常州工学院-评教系统-管理员登陆界面</title>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link rel="stylesheet" th:href="@{/css/bootstrap.css}">
    <script type="text/javascript" th:src="@{/js/jquery-3.5.1.js}"></script>
    <script type="text/javascript" th:src="@{/js/bootstrap.js}"></script>
    <style>

        html,
        body {
            height: 100%;
        }

        body {
            display: -ms-flexbox;
            display: flex;
            -ms-flex-align: center;
            align-items: center;
            padding-top: 40px;
            padding-bottom: 40px;
            background-color: #f5f5f5;
        }

        .form-signin {
            width: 100%;
            max-width: 330px;
            padding: 15px;
            margin: auto;
        }
        .form-signin .checkbox {
            font-weight: 400;
        }
        .form-signin .form-control {
            position: relative;
            box-sizing: border-box;
            height: auto;
            padding: 10px;
            font-size: 16px;
        }
        .form-signin .form-control:focus {
            z-index: 2;
        }
        .form-signin input[type="email"] {
            margin-bottom: -1px;
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }
        .form-signin input[type="password"] {
            margin-bottom: 10px;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }


    </style>
</head>
<body class="text-center">
<form class="form-signin" novalidate method="post" action="/ManagerController/handle_manager_login">
    <a href="/index"><img class="mb-4" th:src="@{/images/index/favicon.png}" alt="" width="72" height="72"></a>
    <h1 class="h3 mb-3 font-weight-normal">管理员登陆</h1>
    <div class="form-group">
        <label for="adminId" class="sr-only">admin id</label>
        <input type="text" id="adminId" class="form-control" placeholder="admin ID" name="adminId" required autofocus/>
        <div class="invalid-feedback">账号不得为空</div>
    </div>

    <div class="form-group">
        <label for="inputPassword" class="sr-only">Password</label>
        <input type="password" id="inputPassword" class="form-control" placeholder="admin password" required name="password"/>
        <div class="invalid-feedback">密码不得为空</div>
    </div>

    <div class="checkbox mb-3">
        <label>
            如遇到登陆问题，请联系系统管理员
        </label>
    </div>
    <button class="btn btn-lg btn-primary btn-block" type="submit">登 陆</button>
    <p class="mt-5 mb-3 text-muted">&copy; 2021-5月</p>
</form>
<script type="text/javascript">
    $(document).ready(function () {

        $(".form-signin").submit(function (event) {
            var $form = $(this);

            if($form[0].checkValidity()===false){
                event.preventDefault();
                event.stopPropagation();
            }

            $form.addClass("was-validated")
        })



    })

</script>
</body>
</html>